﻿define('ui/card/layerCard', 
	[], 
	 function() {

	var layerCard = {
		showAll: function() {
			$('.time-SearchData').css({"display":"block"});
		},
		showCardItem: function(item) {
			$('.time-SearchData').css({"display":"inline-block"});
			$('.time-SearchData').find('ul>li').css({"display":"none"});
			if(item=='enterprise') {
				$('#enterpriseLayerList').css({"display":"inline-block"});
			}else if(item=='point'){
				$('#pointLayerList').css({"display":"inline-block"});
			}else if(item=='pointDetail'){
				$('#pointLayerList').css({"display":"inline-block"});
				$('#pointDetailLayerList').css({"display":"inline-block"});
			}else if(item=='emission'){
				$('#emissionLayerList').css({"display":"inline-block"});
			}else if(item=='enviorment'){
				$('#emissionLayerList').css({"display":"inline-block"});
				$('#enviormentLayerList').css({"display":"inline-block"});
			}else if(item=='illegal'){
				$('#illegalLayerList').css({"display":"inline-block"});
			}
		},
		closeAll: function() {
			$('.time-SearchData').css({"display":"none"});
			$("#enterpriseTabDiv").css({"display":"none"});
			$("#pointTabDiv").css({"display":"none"});
			$("#pointDetailTabDiv").css({"display":"none"});
			$("#emissionTabDiv").css({"display":"none"});
			$("#enviormentTabDiv").css({"display":"none"});
			$("#illegalTabDiv").css({"display":"none"});
		},
		
		eventBind: function() {
			
			var enterpriseCard = require('ui/card/enterpriseCard');
			var pointCard = require('ui/card/pointCard');
			var pointDetailCard = require('ui/card/pointDetailCard');
			var emissionCard = require('ui/card/emissionCard');
			var enviormentCard = require('ui/card/enviormentCard');
			var illegalCard = require('ui/card/illegalCard');
			
			enterpriseCard.renderTab();
			pointCard.renderTab();
			pointDetailCard.renderTab();
			emissionCard.renderTab();
			enviormentCard.renderTab();
			illegalCard.renderTab();
		}
	};
	
	return layerCard;
});